package com.blades.item;

import java.util.concurrent.atomic.AtomicLong;

/**
 * Created by shuangjun.yang on 2016/3/17.
 * 调用次数监控项
 */
public class CountMonitorItem {
    private AtomicLong countSize = new AtomicLong();

    public void addCount(Long count){
        countSize.addAndGet(count);
    }

    public Long getAndClear(){
       return  countSize.getAndSet(0);
    }
    public AtomicLong getCountSize() {
        return countSize;
    }

    public void setCountSize(AtomicLong countSize) {
        this.countSize = countSize;
    }
}
